﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Registro.Compras.Api.Models;
using Registro.Compras.Data.Business;

using System.Threading.Tasks;
using System.Web.Http.Description;
using Registro.Compras.Data.Entities;
using System.Web.Http.Cors;

namespace Registro.Compras.Api.Controllers
{
    [EnableCors(origins: "*", headers: "*", methods: "*")]
    public class Tabla10Controller : ApiController
    {
        // GET api/Tabla10/
        public IEnumerable<Tabla10Model> Get()
        {
            return Tabla10Business.GetListByFilter("").Select(t => new Tabla10Model
            {
                Id = t.Id,
                Descripcion =t.Descripcion,
            });
        }
        public Tabla10Model Get(int id)
        {
            Tabla10 t = Tabla10Business.GetById(id);
            return new Tabla10Model
            {
                Id = t.Id,
                Descripcion = t.Descripcion,
            };
        }
    }
}
